package chat.ourGamePackage3;

import java.awt.Graphics;
import java.awt.Image;

public class Sprite
{
	/** The image to be drawn for this sprite */
	private Image image;
	
	public Sprite(Image image)
	{
		this.image = image;
	}
	
	/**
	 * Get the width of the drawn sprite
	 * 
	 * @return The width in pixels of this sprite
	 */
	public int getWidth() 
	{
		return this.image.getWidth(null);
	}
	
	/**
	 * Get the height of the drawn sprite
	 * 
	 * @return The height in pixels of this sprite
	 */
	public int getHeight() 
	{
		return this.image.getHeight(null);
	}
	
	public void draw(Graphics g, int x, int y)
	{
		g.drawImage(this.image,x,y,null);
	}
}
